<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>Fit-Content</title>
    <script src="echarts.js"></script>

    <style>
        h1{
             text-align: center;
        }
    </style>
</head>
<body>
<h1>统计</h1>
<div id="main" style="width: 387px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
      tooltip: {},
      legend: {},
      dataset: {
        source: [
          ['product', '销量', '库存'],
          ['衬衫', 43, 85],
          ['羊毛衫', 20, 74],
          ['雪纺衫', 64, 10],
          ['裤子', 90, 53],
          ['高跟鞋', 55, 87],
          ['袜子', 88, 20],
        ]
      },
      xAxis: { type: 'category' },
      yAxis: {},
      series: [{ type: 'bar' }, { type: 'bar' }]
};

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>
